//
//  TestController.m
//  RacMVVM
//
//  Created by 崔博 on 2018/11/28.
//  Copyright © 2018年 崔博. All rights reserved.
//

#import "TestController.h"
#import "Test1Model.h"
@interface TestController ()
@property (nonatomic, strong,readwrite)TestViewModel *viewModel;
@end

@implementation TestController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor redColor];
    
    UIButton * btn = [[UIButton alloc] init];
    btn.frame = CGRectMake(100, 100, 100, 100);
    [btn setTitle:@"1111" forState:0];
    
    [[btn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
        Test1Model *test1 = [[Test1Model alloc] initWithService:self.viewModel.services parms:nil];
        [self.viewModel.services pushViewModel:test1 animated:YES];
    }];
    [self.view addSubview:btn];
}
- (void)bindViewModel
{
    [super bindViewModel];
    
}
@end
